<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>回复评论</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

	<script type="text/javascript" src="<%=basePath%>ckeditor/ckeditor.js"></script>

<script type="text/javascript">
  	function CkeckForm(){
  		//var oEditor = CKEDITOR.instances.CommentReply;
  		var topiccomment=document.getElementById("topiccomment_content").value;
  		/* if(oEditor.getData()==""){
  			document.getElementById("erromsg").innerHTML="至少写点什么吧！";
  			document.getElementById("erromsg").style.color="red";
  			return false;
  		} */
  		if(topiccomment==""){
  			document.getElementById("erromsg").innerHTML="至少写点什么吧！";
  			document.getElementById("erromsg").style.color="red";
  			return false;
  		}
  		else{
  			return true;
  		}
  	}
</script>
<style type="text/css">
body{
	background-image:url('<%=basePath%>images/background4.jpg');
	background-repeat:no-repeat;
}
#navigatorInfo a:link {text-decoration:none;} /* 未访问的链接 */
#navigatorInfo a:visited {text-decoration:none;} /* 已访问的链接 */
#navigatorInfo a:hover {text-decoration:none;} /* 鼠标移动到链接上 */
#navigatorInfo a:active {text-decoration:none;} /* 选定的链接 */
</style>
  </head>
  
  <body>
  
    <jsp:include page="../head.jsp"></jsp:include>  
    
	<div class="rightcase">
	
 	   <div style="min-height:600px;width:100%;margin:0 auto;background-color:#ffffff;"> 
 	   <div style="width:100%;height:30px;margin-left:10px;line-height:30px;">
				<a href="<%=basePath%>User_LoginAction"><img src="<%=basePath%>images/club_img2.png" width="15px" height="15px"></a>
				<span id="navigatorInfo" style="font-size:10pt;font-family:微软雅黑;">>&nbsp;
					<!-- 判断是同龄圈还是医院圈 -->
					<s:if test="doctorinfo.doctorId!=null&&doctorinfo.doctorId!=0">
						<span style="font-size:10pt;font-family:微软雅黑;">>&nbsp;
							<a href="<%=basePath%>club_selectClubAction?clubid=${club.clubCategoryId}&page=${pagebean.currpage}&rows=${pagebean.rows}&docid=${doctorinfo.doctorId}" style="text-decoration:none;">
						<s:property value="club.clubName"/></a></span>
						<span style="font-size:10pt;font-family:微软雅黑;">>&nbsp;
							<a href="<%=basePath%>club_selectClubAction?clubid=${club.clubCategoryId}&orderflag=${pagebean.orderflag}&topicClassifyId=${pagebean.topicClassifyId}&page=${pagebean.currpage}&rows=${pagebean.rows}&docid=${doctorinfo.doctorId}" style="text-decoration:none;">
								<s:property value="doctorinfo.doctorName"/>圈
							</a>
						</span>
					</s:if>
					<s:else>
						<a href="<%=basePath%>club_selectClubAction?clubid=${club.clubId}&orderflag=${pagebean.orderflag}&topicClassifyId=${pagebean.topicClassifyId}&page=${pagebean.currpage}&rows=${pagebean.rows}"  style="text-decoration:none;">
							<s:property value="club.clubName"/>同龄圈
						</a>
					</s:else>	
					>
					<!-- 判断标题的长度 -->
					<s:if test="topic.topicTitle.length()<65">
						<a href="<%=basePath%>club_reviewTopicAction?&orderflag=${pagebean.orderflag}&topicClassifyId=${pagebean.topicClassifyId}&page=${pagebean.currpage}&rows=${pagebean.rows}&topicid=<s:property value="topic.topicId"/>">
							<s:property value="topic.topicTitle"/>
						</a>
					</s:if>
					<s:else>
					   <a href="<%=basePath%>club_reviewTopicAction?&orderflag=${pagebean.orderflag}&topicClassifyId=${pagebean.topicClassifyId}&page=${pagebean.currpage}&rows=${pagebean.rows}&topicid=<s:property value="topic.topicId"/>">
					   	 <s:property value="%{topic.topicTitle.substring(0, 65) + \"...\"}"/>
					   	</a>
					</s:else> 
				</span>				
	   </div>
 	   
 	   <form id="topicForm" action="<%=basePath%>club_addTopicCommentAction" method="post" enctype ="multipart/form-data">
 	   	 <!-- 隐藏表单域 -->
 	   	 <input type="text" name="topic.clubCategoryId" value="<s:property value='club.clubCategoryId'/>" style="border:0;display:none"/>
 	   	 <input type="hidden" name="topiccomment.originalTopicId" value="<s:property value='topic.topicId'/>"/>
 	   	 <input type="hidden" name="topiccomment.commentAuthorId" value="<s:property value='#session.temploginbean.userId'/>"/>
 	   	 <input type="hidden" name="topiccomment.isReplyComment" value="1"/>
 	   	 <input type="hidden" name="topiccomment.originalCommentorName" value="<s:property value='topiccomment.originalCommentorName'/>"/>
 	   	 <input type="hidden" name="topiccomment.originalReplyTime" value="<s:property value='topiccomment.originalReplyTime'/>"/>
 	   	 <input type="hidden" name="topiccomment.originalCommentText" value="<s:property value='topiccomment.originalCommentText'/>"/>
 	   	 <!-- 若为医院圈 -->
		 <s:if test="doctorinfo.doctorId!=null&&doctorinfo.doctorId>0">
			<input type="hidden" name="doctorinfo.doctorId" value="<s:property value='doctorinfo.doctorId'/>">
		 </s:if>
		
 	   	 <div style="width:100%;height:50px;margin-left:20px;">
				<span style="font-size:12pt;font-family:微软雅黑;">回复“
					<s:property value="topiccomment.originalCommentorName"/>”
					发表于<s:property value="topiccomment.originalReplyTime"/>
				</span>
		 </div>
 	   
 	   	  <div style="min-height:95%;width:90%;padding:20px;margin:0 auto;border:1px solid #E0FFFF; ">
			<div style="width:100%;margin:0px auto;">
				 内容：<br/><br/>
				 <textarea id="topiccomment_content" name="topiccomment.commentText" style="width:98%;height:300px"></textarea>
				<!--  <textarea id="CommentReply" name="topiccomment.commentText" class="ckeditor"></textarea>	 -->		 	
			</div>
	
			<div style="width:100%;height:30px;margin:0px auto;">
				<div style="width:10%;height:100%;float:left;">
					<input type="image" src="<%=basePath%>images/addTopic.png" style="cursor: pointer;" onclick="return CkeckForm();" border=0>
				</div>
				<div style="width:88%;height:100%;float:right;text-align:left;">
					<span id="erromsg"></span>
				</div>
			</div>
		</div>
		</form>
		</div>
    <%@ include file="../foot.jsp"%>
  </div>
  </body>
</html>
